<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=yes">

    <meta content="telephone=yes,email=yes" name="format-detection">
    <!--//自动识别电话号码和邮箱-->

    <meta content="yes" name="apple-mobile-web-app-capable">
    <!--//苹果手机：会删除默认的工具栏和菜单栏，网站开启对web app程序的支持-->
    <meta name="apple-mobile-web-app-status-bar-style" content="default"/>
    <!--//苹果手机：在web app应用下状态条（屏幕顶部条）的颜色,默认值为default（白色），可以定为black（黑色）和black-translucent（灰色半透明）。-->
    <meta name="apple-touch-fullscreen" content="yes"/>
    <!--//苹果手机：如果把一个web app添加到了主屏幕中，那么从主屏幕中打开这个web app则全屏显示-->
    <link rel="apple-touch-icon" href="images/HTML5_Badge_64.png"/>
    <!--//苹果手机：将应用添加到手机主屏幕，会有一个icon可以直接进入-->
    <title>有收入</title>
    <meta name="description" content="">
    <meta name="keywords" content="">
    <!--初始化样式-->
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/UploadImg.css">
    <link rel="stylesheet" href="css/LArea.css">
    <!--共用样式-->
    <link rel="stylesheet" href="css/common.css">
    <!--整个网站的局部样式-->
    <link rel="stylesheet" href="css/style.css">
    <!--适配样式-->
    <link rel="stylesheet" href="css/styleMedia.css">
    <style>
        .pwd-reset select {
    width: 3.6rem;
    height: 0.4rem;
    outline: none;
    font-size: 0.28rem;
    vertical-align: middle;
    color: #757575;
    background-color: #fff;
    border: none;
}
    </style>

</head>

<body style="background-color: #f4f9fd;">

<!--header begin-->
<header class="header-border-bt">
    <div id="flexHeader">
        <div class="div1"><a  href="bindOnAccount.html"><img src="images/icon_arrow_left.png"></a></div>
        <div class="div2">淘宝绑定</div>
        <div class="div3"></div>
    </div>
</header>
<!--header end-->

<!--binding-taoBao begin-->
<article class="login bindingQQ taoBao-bind-info">
    <div>
        <P>账户信息</P>
    </div>
    <form action="" method="post" id="frombyfrist" >
        <div class=" taoBao-bind pwd-reset binding-qq ">
            <label>账户</label>
            <input type="search" name="username" class="ifFree"  placeholder="淘宝账户名" onmouseleave="checkInput()" oninput="changeBtnable()">
        </div>
        <div class=" taoBao-bind pwd-reset binding-qq ">
            <label>收货人</label>
            <input type="search" name="receiver" class="ifFree" placeholder="" onmouseleave="checkInput()" oninput="changeBtnable()">
        </div>
        <div class=" taoBao-bind pwd-reset binding-qq ">
            <label>手机</label>
            <input type="search" name="phone" class="ifFree" placeholder="12535685325" onmouseleave="checkInput()" oninput="changeBtnable()">
        </div>
        <div class=" taoBao-bind pwd-reset binding-qq ">
            <label>城市</label>
            <input id="demo1" type="text" readonly="" placeholder="城市选择特效" value="广东省,深圳市,南山区" />
            <input name="city" id="value1" type="hidden" value="20,234,504" />
        </div>
        <div class=" pwd-reset binding-qq ">
            <label>详细地址</label>
            <input type="search" name="addressdetali" class="ifFree" placeholder="杏林街道" onmouseleave="checkInput()" oninput="changeBtnable()">
        </div>
</article>
<!--binding-taoBao end-->

<!--binding-taoBao begin-->
<article class="login  taoBao-bind-info-padding">
    <div>
        <P>账户属性</P>
    </div>
        <div class=" taoBao-bind pwd-reset binding-qq ">
            <label>性别</label>
            <select name="sex">
                <option value="1">男</option>
                <option value="2">女</option>
            </select>
        </div>
        <div class=" taoBao-bind pwd-reset binding-qq ">
            <label>年龄</label>
            <input type="search" name="age" class="ifFree" placeholder="23" onmouseleave="checkInput()" oninput="changeBtnable()">
        </div>
        <div class=" taoBao-bind pwd-reset binding-qq ">
            <label>等级</label>
            <input type="search" name="grade" class="ifFree" placeholder="5" onmouseleave="checkInput()" oninput="changeBtnable()">
        </div>
        <div class=" taoBao-bind pwd-reset binding-qq ">
            <label>经营范围</label>
           <!--  <input type="search" class="ifFree" placeholder="服装鞋包，百货食品、文化娱乐" onmouseleave="checkInput()" oninput="changeBtnable()"> -->

            <select name="shopkind">
                <option>点击请您选择</option>
                <option selected="selected" value="服装鞋包">服装鞋包</option>
                <option value="百货食品">百货食品</option>
                <option value="文化娱乐">文化娱乐</option>
            </select>
        </div>
        <div class=" taoBao-bind pwd-reset binding-qq taoBao-bind-info-img ">
            <label>信誉等级</label>
            <div class="fileBtn6">
                <p>+</p>
                <input id="fileBtn6" name="files" type="file" onchange="upload6();" accept="image/*"  multiple="multiple"/>
                <!--单张图片容器-->
                <img src="" id="img6"/>
            </div>
        </div>
        <div class=" taoBao-bind pwd-reset binding-qq taoBao-bind-info-img">
            <label>实名认证</label>
            <div class="fileBtn7">
                <p>+</p>
                <input id="fileBtn7" name="files" type="file" onchange="upload7();" accept="image/*"  multiple="multiple"/>
                <!--单张图片容器-->
                <img src="" id="img7"/>
            </div>
        </div>
        <div class=" pwd-reset binding-qq taoBao-bind-info-img">
            <label>花呗必须</label>
            <div class="fileBtn8">
                <p>+</p>
                <!--capture="camera"-->
                <input id="fileBtn8" name="files" type="file" onchange="upload8();" accept="image/*"  multiple="multiple"/>
                <!--单张图片容器-->
                <img src="" id="img8"/>
            </div>
        </div>
        <aside>
            <p>账号审核时间周一至周五9:30-18:00,账号提交后5个工作日内完成审核，如遇周末或节假日顺延，审核工作人工进行，用户请耐心等待，新手请务必查看审核要求！</p>
            <p><a href="new_taobaoBindClaim.html">进入查看绑定要求</a> </p>
        </aside>
        <a> <input type="button" disabled id="summitBut" class="user-login-btn bind-btn" value="提交审核"></a>
    </form>
</article>
<!--binding-taoBao end-->








<!--js-->
<script src="js/jquery-1.12.3.min.js"></script>
<script src="js/common.js"></script>
<!--<script src="js/vconsole.min.js"></script>-->
<!--<script>-->
<!--var vConsole = new VConsole();-->
<!--console.log('hello');-->
<!--</script>-->
<script type="text/javascript" src="js/zepto.min.js"></script>
<script src="js/mui.min.js"></script>
<script src="js/UploadImg.js"></script>
<script src="js/config.js"></script>
<script src="js/vconsole.min.js"></script>
<script>
	var vs = new VConsole()
	$("#summitBut").click(function(){
		var form = document.getElementById("frombyfrist");
		var formdata = new FormData(form);
		formdata.set('city', $('#demo1').val()) // 城市
		if (!isNum(formdata.get('age'))) {
			mui.toast('请输入正确的年龄')
			return
		}
		if (!isNum(formdata.get('grade'))) {
			mui.toast('请输入正确的等级数')
			return
		}
		$.ajax({
			url:$CONFIG.baseUrl+"/api/bindTaobao",
			type: 'post',
			data: formdata,
			contentType:false,
			processData:false,
			beforeSend:function(x){
				x.setRequestHeader("Authorization",localStorage.getItem('token'));
			},
			success: function(data){
				plus.nativeUI.toast(data.msg)
				if(data.code===200){
					window.location = "bindOnAccount.html"
				}
			},
			errror: function(error){
				console.log('error')
			}
		})
	})
	function isNum(nubmer) { 
	　　var re = /^[0-9]+.?[0-9]*/;//判断字符串是否为数字//判断正整数/[1−9]+[0−9]∗]∗/;//判断字符串是否为数字//判断正整数/[1−9]+[0−9]∗]∗/ 
	　　return re.test(nubmer);
	}
</script>

<script language="JavaScript" type="text/javascript">
    function checkInput(){
        var text = $("input").val();
        if(text==null||text==""){
            changeBtndisable();
        }
    }
    function changeBtndisable(){
        $("#summitBut").addClass("user-login-btn");
        $("#summitBut").attr("disabled","true");
    }


    function changeBtnable(){
        $("#summitBut").removeAttr("disabled").removeClass("user-login-btn");
        $("#summitBut").addClass("user-login-btn-selected");

    }

    var file = document.querySelector('input');
    if (getIos()) {
        file.removeAttribute("capture");
    }
    function getIos() {
        if (!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) {
            return true;
        } else {
            return false;
        }
    }
</script>

<script src="js/LAreaData1.js"></script>
<script src="js/LAreaData2.js"></script>
<script src="js/LArea.js"></script>
<script>
    var area1 = new LArea();
    area1.init({
        'trigger': '#demo1', //触发选择控件的文本框，同时选择完毕后name属性输出到该位置
        'valueTo': '#value1', //选择完毕后id属性输出到该位置
        'keys': {
            id: 'id',
            name: 'name'
        }, //绑定数据源相关字段 id对应valueTo的value属性输出 name对应trigger的value属性输出
        'type': 1, //数据源类型
        'data': LAreaData //数据源
    });
    area1.value=[1,15,3];//控制初始位置，注意：该方法并不会影响到input的value
    var area2 = new LArea();
    area2.init({
        'trigger': '#demo2',
        'valueTo': '#value2',
        'keys': {
            id: 'value',
            name: 'text'
        },
        'type': 2,
        'data': [provs_data, citys_data, dists_data]
    });
</script>
</body>
</html>